<?php
/**
 * Created by PhpStorm.
 * User: 小蛮哼哼哼
 * Email: 243194993@qq.com
 * Date: 2022/1/19
 * Time: 10:12
 * motto: 现在的努力是为了小时候吹过的牛逼！
 */

declare(strict_types=1);

namespace app\api\model\mysql;

use app\common\model\TimeModel;

class MallSpecsValue extends TimeModel
{
    /**
     * @param array $ids
     * @return array
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     */
    public function getSpecsValueByIds(array $ids = []): array
    {
        return $this
            ->field('id,title as name,specs_id,specs_id as pid')
            ->where('id', 'in', $ids)
            ->select()
            ->toArray();
    }
}